Introduction

What is DataObjects.Net?

DataObjects.Net is a rapid database application development framework. It combines business logic layer (BLL) development library, object-relational mapper (ORM) and a set of storage providers allowing the same BLL code to work transparently on any of them.

Most frictionless environment you can find

DataObjects.Net helps you to model complex domains with ease. It supports the development path you used to follow. We put a lot of efforts to allow you thinking of persistent objects as of regular .NET objects. DataObjects.Net relies on “Model-First” (or “Code-First”) concept pushing developers to focus on domain model and its business logic instead of caring about how and when the entities must be persisted. This allows you to design models using just usual .NET classes. Moreover, we eliminated the need to maintain separate XML mapping files.

So building complex models containing hundreds of persistent types is nearly as simple as doing the same for non-persistent models.

Database schema: generation and evolution

DataObjects.Net provides built-in version-to-version migration pattern for your applications. It automatically creates, and, if necessary, upgrades the schema on each Domain startup preserving all the data. The upgrade process is fully customizable.

Perfect LINQ implementation

DataObjects.Net has a full-featured LINQ-to-SQL translator with support for multiple SQL dialects. It is, likely, the first ORM designed to compile LINQ queries not just to SQL, but to generally any other query language. Its internal query representation is similar to query plan used in SQL databases instead of AST. This feature allows it to perform really complex query transformations while producing query for target database. Currently DataObjects.Net supports:

  • Microsoft SQL Server 2012 / 2014 / 2016 / 2017 / 2019 (including Express editions)
  • Windows Azure SQL Database
  • Oracle Database 10g and 11g (including Express editions)
  • PostgreSQL 8.3, 8.4, 9.x, 10.x, 11.x, 12.x and 13.x
  • Firebird 2.5
  • MySQL 5.5, 5.6
  • SQLite 3

DataObjects.Net allows to transparently migrate between any of storages it supports.

High performance

DataObjects.Net provides various performance features:

  • DataObjects.Net supports so-called generalized batching. This means it almost never sends separate queries; instead, it joins the queries it produces in batches and sends them only when a result of some of these queries is necessary in your application. Of course, this is a rough description, but it explains what really happens there.
  • Future queries allows generalized batching to work almost ideally. DataObjects.Net batches future queries and CUD statements (insertions, updates and deletions) together.
  • Finally, there is prefetch API allowing to fetch arbitrary graphs of objects in few roundtrips.

System requirements

DataObjects.Net 7 is built for .NET Core 3.1 so to start developing you need to have .Net Core 3.1 SDK for developing or .NET Core 3.1 Runtime to run built applications.

To install DataObjects.Net you need to have the following components:

  • .Net Core 3.1 SDK (runtime is included)
  • An operating system that supports .NET Core 3.1
  • Development environment: optional; Visual Studio 2019 or other IDE that supports .Net Core 3.1 applications development
  • Database server: optional; Any supported, SQL Server is recommended.

Note

Applications based on DataObjects.Net require just target platform they built for.

Supported programming languages

DataObjects.Net supports modern CLR-based languages:

  • C# (preferred, all examples in this manual are in C#)
  • F#

DataObjects.Net Distribution

NuGet

Each release of DataObjects.Net is distributed as set of NuGet packages. ORM core libraries, database providers and extensions are provided as separate items.

Core package - Xtensive.Orm

The package includes core libraries and services.

Database provider packages

  • Xtensive.Orm.SqlServer - DataObjects.Net provider for MS SQL Server.
  • Xtensive.Orm.Firebird - DataObjects.Net provider for Firebird.
  • Xtensive.Orm.MySQL - DataObjects.Net provider for MySQL.
  • Xtensive.Orm.PostgreSql - DataObjects.Net provider for PostgreSQL.
  • Xtensive.Orm.SQLite - DataObjects.Net provider for SQLite.
  • Xtensive.Orm.Oracle - DataObjects.Net provider for Oracle.

Extension packages

  • Xtensive.Orm.BulkOperations - Bulk operations extension.
  • Xtensive.Orm.Localization - Localization extension.
  • Xtensive.Orm.Security - Security extension.
  • Xtensive.Orm.Reprocessing - Operation reprocessing extension.
  • Xtensive.Orm.Web - ASP.NET Core support extension.
  • Xtensive.Orm.Logging.NLog - Logging provider for NLog.
  • Xtensive.Orm.Logging.log4net - Logging provider for log4net.
  • Xtensive.Orm.Tracking - Change tracking extension.

Note

For all list of packages see Xtensive’s profile at NuGet gallery.

Github repository

DataObjects.Net is available to download or fork on Github and build packages for yourself by using dotnet build -c Release

Note

DataObjects.Net and its extensions published here are licensed under the MIT license.

Package contents

DataObjects.Net distribution consists of the following components:

  • Lib directory contains run-time libraries that are required for building and running DataObjects.Net-based applications.
  • Tools directory contains build-time components that are required for building DataObjects.Net-based applications.